﻿<%@ WebHandler Language="C#" Class="checkimg" %>

using System.Web;
using MasApp.Validate;
using MasApp.BLL;
using System.IO;
using System.Web.SessionState;

public class checkimg : IHttpHandler, IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        ValidateNumber validate = new ValidateNumber();
        validate.CreateValidateGraphic(context, 4);

        ////获得验证码
        //string code = validate.createValidateString(4);
        //MemoryStream stream = validate.getImgStream(code);
        ////保存验证码到session
        //SessHelper.setValidateKey(context.Session, code);
        ////输出图片
        //context.Response.ContentType = "image/jpeg";
        //context.Response.BinaryWrite(stream.ToArray());
    }

    public bool IsReusable
    {
        get
        {
            return true;
        }
    }

}